package com.dao;

import com.dto.MemberDTO;
import com.po.MemberPO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * @author linyukun
 * @date 2022/7/5 19:08
 */
@Mapper
@Repository
public interface MemberDao {
    Integer addMember(@Param("dto") MemberDTO dto);

    Integer editMember(@Param("dto")MemberDTO dto);

    MemberPO getMemberById(@Param("id")long id);

    List<MemberPO> getMemberList(@Param("dto")MemberDTO dto);

    List<MemberPO> getAdminMemberList(@Param("dto")MemberDTO dto);

    MemberPO getMemberByIdCard(@Param("idCard") String idCard);

    MemberPO getMemberByphoneNumber(@Param("phoneNumber")String phoneNumber);

    Integer delMember(@Param("dto")MemberDTO dto);

    List<MemberPO> getAdminByUserName(@Param("userName")String userName);

    Integer addAdmin(@Param("dto")MemberDTO dto);

    Integer resetAdminPassword(@Param("dto")MemberDTO dto);
}
